package se.webbzon.oschi01.world;

import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.Collection;

import se.webbzon.oschi01.utils.Reader;
import se.webbzon.oschi01.utils.Writer;

public interface World {
	
	public boolean addDimension(Dimension dimension);
	
	public boolean removeDimension(Dimension dimension);
	
	public boolean hasDimension(Dimension dimension);
	
	public int dimensions();
	
	public Dimension getDimension(int index);
	
	public Dimension getDimension(String name);
	
	public <T> T getDatum(String resource, Reader<T,InputStream> reader) throws IOException;
	
	public <T> void setDatum(String resource, T datum, Writer<T,OutputStream> writer) throws IOException;
	
	public boolean hasDatum(String resource);
	
	public Collection<String> getData();

}
